package loader;

/**
 * Created by Administrator on 2017/10/25 025.
 */
public class Demo2
{
    public static void main(String[] args) throws Exception
    {
//        ClassLoader cl = ClassLoader.getSystemClassLoader();
//        cl.loadClass("loader.C2");
//        Class.forName("loader.C2");
        ClassLoader loader = Demo2.class.getClassLoader();
        while (loader != null){
            System.out.println("classloader name = " + loader);
            loader = loader.getParent();
        }
    }
}

